package com.huifaapp.mall.bean;

import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2018/1/12.
 */

public class OrdersCalactualMoney {
    public static class Attr {
        public static final String ACTUALPAY = "actualPay";
        public static final String COMPAREAMOUNT="compareAmount";



    }
    public OrdersCalactualMoney() {

    }

    public OrdersCalactualMoney(double actualPay,double compareAmount){
        super();
        this.actualPay=actualPay;
        this.compareAmount=compareAmount;


    }
    /**
     * receiverName : 黎明
     * receiverPhone : 15100012231
     * detail : 小区8号楼909
     * id : 977b3e2c48024a30bb0819b7259e063b
     */

    private double actualPay;
    private double compareAmount;



    public static OrdersCalactualMoney newInstanceDetails(String json) {
        OrdersCalactualMoney bean = null;
        try {
            JSONObject obj = new JSONObject(json);
            if (obj.length() > 0) {
                Log.e("tag", obj+"");

                double actualPay=obj.getDouble(Attr.ACTUALPAY);
                double compareAmount=obj.getDouble(Attr.COMPAREAMOUNT);


                bean = new OrdersCalactualMoney(actualPay,compareAmount);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return bean;
    }

    public double getCompareAmount() {
        return compareAmount;
    }

    public void setCompareAmount(double compareAmount) {
        this.compareAmount = compareAmount;
    }

    public double getActualPay() {
        return actualPay;
    }

    public void setActualPay(double actualPay) {
        this.actualPay = actualPay;
    }
}
